package com.etc.service;

import com.etc.dao.UserDao;
import com.etc.entity.User;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.support.SqlSessionDaoSupport;

import java.util.ArrayList;
import java.util.List;


/**
 * 用户业务层
 */
public class UserService extends SqlSessionDaoSupport implements UserDao {

    @Override
    public User findbyid(Integer id) {
        SqlSession sqlSession = getSqlSession();
        List<User> user = sqlSession.selectList("findbyid",id);
        return user.get(0);
    }

    @Override
    public Integer save(User user) {
        return null;
    }

    @Override
    public Integer deletebyid(Integer id) {
        return null;
    }

    @Override
    public Integer updatebyid(User user) {
        return null;
    }

    @Override
    public List<User> getUserOrderList() {
        return null;
    }
}
